<!DOCTYPE html>
<html>
	<head>
		<meta charset="utf-8">
		<title>选择器权重</title>
		<!-- 选择器权重越高，选中几率越大 -->
		<style>
			*{/*权值0 很容易被覆盖*/
				color: #5555ff;
			}
			div{ /*权值1 */
			color:#00ff00;
			background:#ff557f
			}
			.d1{ /*权值 10*/
			color:#ff0000;
			background:#aaff00
			}
			div .d1{ /*选择器权值之和 权值1+10 11*/
			color:#55ff00;
			background:#ff8000
			}
			body div .d1{ /*权值12*/
			color:##000000;
			background:#ff0000
			}
			#d1{ /*权值 100*/
			font-size: 20px;
			color:#0055ff;
			background:#55aaff
			}
			div#d1:hover{ /*权值 101*/
			color:#ee55ff;
			background:#aaaa00
			}
			div#d1:hover{/* 权重 111 */
			color: black;
					}
		</style>
	</head>
	<body>
		<div class="d1" id="d1">Lorem ipsum dolor sit amet consectetur, adipisicing elit. Aspernatur veniam labore quis consequatur. Quas dolore at ducimus aliquam animi in nulla aut error quam. Mollitia architecto cum iusto facilis ratione!</div>
	</body>
</html>